<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Cdwdoris\V20211228\Models;
use TencentCloud\Common\AbstractModel;

/**
 * ExecuteSelectQuery response structure.
 *
 * @method integer getTotalCount() Obtain Total records of query results
 * @method void setTotalCount(integer $TotalCount) Set Total records of query results
 * @method array getFields() Obtain Field name array of query results
 * @method void setFields(array $Fields) Set Field name array of query results
 * @method array getFieldTypes() Obtain Field type array of query results
 * @method void setFieldTypes(array $FieldTypes) Set Field type array of query results
 * @method array getRows() Obtain Returned data record array. Each element is an array, containing the value of the corresponding field.
 * @method void setRows(array $Rows) Set Returned data record array. Each element is an array, containing the value of the corresponding field.
 * @method string getMessage() Obtain Error message
 * @method void setMessage(string $Message) Set Error message
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
 */
class ExecuteSelectQueryResponse extends AbstractModel
{
    /**
     * @var integer Total records of query results
     */
    public $TotalCount;

    /**
     * @var array Field name array of query results
     */
    public $Fields;

    /**
     * @var array Field type array of query results
     */
    public $FieldTypes;

    /**
     * @var array Returned data record array. Each element is an array, containing the value of the corresponding field.
     */
    public $Rows;

    /**
     * @var string Error message
     */
    public $Message;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    public $RequestId;

    /**
     * @param integer $TotalCount Total records of query results
     * @param array $Fields Field name array of query results
     * @param array $FieldTypes Field type array of query results
     * @param array $Rows Returned data record array. Each element is an array, containing the value of the corresponding field.
     * @param string $Message Error message
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("TotalCount",$param) and $param["TotalCount"] !== null) {
            $this->TotalCount = $param["TotalCount"];
        }

        if (array_key_exists("Fields",$param) and $param["Fields"] !== null) {
            $this->Fields = $param["Fields"];
        }

        if (array_key_exists("FieldTypes",$param) and $param["FieldTypes"] !== null) {
            $this->FieldTypes = $param["FieldTypes"];
        }

        if (array_key_exists("Rows",$param) and $param["Rows"] !== null) {
            $this->Rows = [];
            foreach ($param["Rows"] as $key => $value){
                $obj = new Rows();
                $obj->deserialize($value);
                array_push($this->Rows, $obj);
            }
        }

        if (array_key_exists("Message",$param) and $param["Message"] !== null) {
            $this->Message = $param["Message"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
